<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>优购商城</title>
<!--载入css样式-->
<link rel="stylesheet" type="text/css" href="Public/Home/css/base.css"/>
<link rel="stylesheet" type="text/css" href="Public/Home/css/filter.css"/>
<link rel="stylesheet" type="text/css" href="Public/Home/css/list.css"/>

</head>
<body>
<!--载入头部公共模板-->
{{include file='VIEW_PATH/Common/header.php'}}
<!--列表部分模板-->
<div id="list">
	<!--分类选择-->
	<div class="cate">
		<div class="site">
			<span class="tit">您已选择：</span>
			<a href="{{U('List/index',array('cid'=>0))}}">全部分类</a>
			{{foreach from="$pData" value="$v"}}
			>
			<a href="{{U('List/index',array('cid'=>$v['cid']))}}">{{$v['cname']}}</a>
			{{endforeach}}
			<span name="space" style="padding-left: 10px;"></span>
			
			
			
			{{foreach from="$gattr" key="$k" value="$v"}}
			<?php
				$temp = $param;
				$temp[$k]=0;
			?>
			{{foreach from="$v['value']" value="$vv"}}
			{{if value="$param[$k] eq $vv['gaid']"}}
			<div style="display: inline-block;border: 1px dotted #002A80;position: relative;padding-right: 15px;padding-left: 5px;" class="choosed">
				<span>{{$v['name']}}： {{$vv['gavalue']}}</span>
				{{if value="Q('get.bid')"}}
				<a href="{{U('List/index',array('bid'=>Q('get.bid'),'param'=>implode('_',$temp)))}}" class="close_tag" style="position: absolute; top: -4px;right: 3px;display: block;">
				{{else}}
				<a href="{{U('List/index',array('cid'=>Q('get.cid'),'param'=>implode('_',$temp)))}}" class="close_tag" style="position: absolute; top: -4px;right: 3px;display: block;">
				{{endif}}
					<i class="iconfont" style="font-size: 8px;">&#xe63a;</i>
				</a>
			</div>
			{{endif}}
			{{endforeach}}
			{{endforeach}}
		</div>
		
	</div>
	<div class="filter_box filter_gps">
		{{if value="$brandData"}}
		<dl>
			<dt class="filter_brand">品牌</dt>
			<dd class="pinpai_dd">
				<!--<a href="javascript:;" class="more_check pinpailc"><span class="logo_check "></span>多选</a>-->
				<a href="javascript:;" class="more_more pinpaick "><span class="logo_more"></span>更多</a>
				<p class="scorer"><input type="submit" value="确定" /><input type="button" value="取消" class="errors pinpaer"/></p>
				<ul class="brand_imgs">
					{{list from="$brandData" key="$k" name="$v" row='10'}}
					<li><a href="{{U('List/index',array('bid'=>$v['bid']))}}"><img src="{{$v['logo']}}"/></a></li>
					{{endlist}}
				</ul>
				<ul class="brand_word">
					{{foreach from="$brandData" value="$v"}}
					<li class="words_box"><span id="" class="cks "></span><a href="{{U('List/index',array('bid'=>$v['bid']))}}" class="words">{{$v['bname']}}</a></li>
					{{endforeach}}
				</ul>
			</dd>
		</dl>
		{{endif}}
		
		
		{{if value="$cData"}}
		<dl>
			<dt class="">相关分类</dt>
			<dd>
				{{foreach from="$cData" value="$v"}}
				{{if value="$v['_data']"}}
				<div class="classify_box">
					<div  class="classify">
						<a href="{{U('List/index',array('cid'=>$v['cid']))}}" class="classify_word">{{$v['cname']}}</a>
						<span class="classify_logo"></span>
					</div>
					<div class="playnone_box">
						<ul >
							{{foreach from="$v['_data']" value="$vv"}}
							
							<li><a href="{{U('List/index',array('cid'=>$vv['cid']))}}">{{$vv['cname']}}<span>({{$vv['num']}})</span></a></li>
							
							{{endforeach}}
						</ul>
					</div>
				</div>
				{{else}}
					{{if value="$v['num']"}}
				<div class="classify_box">
					<div style="padding-left: 30px;" class="">
						
						<a href="{{U('List/index',array('cid'=>$v['cid']))}}" class="classify_word">{{$v['cname']}}({{$v['num']}})</a>
						
					</div>
				</div>
					{{endif}}
				{{endif}}
				{{endforeach}}
			</dd>
		</dl>
		{{endif}}
		
		
		
		
		<?php
			static $count = 0;
			$key = 0;
		?>
		{{foreach from="$gattr" key="$k" value="$v"}}
		<?php
			$temp = $param;
			$temp[$k]=0;
		?>
		{{if value="$count lt 3 and !$param[$k]"}}
		<dl>
			<dt class="">{{$v['name']}}</dt>
			<dd class="max_dd">
				<!--<a href="javascript:;" class="more_check sizecsmore"><span class="logo_check  "></span>多选</a>-->
				{{if value="count($v['value']) > 6"}}
				<a href="javascript:;" class="more_more moresize"><span class="logo_more"></span>更多</a>
				{{endif}}
				<p class="scorer"><input type="submit" value="确定" /><input type="button" value="取消" class="errors sizeer"/></p>
				<ul class="size_box">
					{{foreach from="$v['value']" value="$vv"}}
					<?php
						$temp[$k]=$vv['gaid'];
						$key = $k;
					?>
					{{if value="Q('get.bid')"}}
					<li><i class="cks"></i><a href="{{U('List/index',array('bid'=>Q('get.bid'),'param'=>implode('_',$temp)))}}">{{$vv['gavalue']}}</a></li>
					{{else}}
					<li><i class="cks"></i><a href="{{U('List/index',array('cid'=>Q('get.cid'),'param'=>implode('_',$temp)))}}">{{$vv['gavalue']}}</a></li>
					{{endif}}
					{{endforeach}}
					<?php
						$count ++;
					?>
				</ul>
			</dd>
		</dl>
		{{endif}}
		{{endforeach}}
		
		{{if value="$key neq 0 and isset($gattr[$key+1])"}}
		
		<dl>
			<dt class="">更多筛选</dt>
			<dd>
				{{foreach from="$gattr" key="$k" value="$v"}}
				{{if value="$k > $key and !$param[$k]"}}
				<div class="classify_box">
					<div  class="classify">
						<a href="JavaScript:;" class="classify_word">{{$v['name']}}</a>
						<span class="classify_logo"></span>
					</div>
					<div class="playnone_box">
						<ul >
							<?php
								$temp = $param;
								$temp[$k]=0;
							?>
							{{foreach from="$v['value']" value="$vv"}}
							<?php
								$temp[$k]=$vv['gaid'];
							?>
							{{if value="Q('get.bid')"}}
							<li><a href="{{U('List/index',array('bid'=>Q('get.bid'),'param'=>implode('_',$temp)))}}">{{$vv['gavalue']}}</a></li>
							{{else}}
							<li><a href="{{U('List/index',array('cid'=>Q('get.cid'),'param'=>implode('_',$temp)))}}">{{$vv['gavalue']}}</a></li>
							{{endif}}
							{{endforeach}}
							<?php
								$count ++;
							?>
						</ul>
					</div>
				</div>
				{{endif}}
				{{endforeach}}
			</dd>
		</dl>
		{{endif}}
		
		
		
		
	</div>
	<!--排序方式-->
	<div class="sort">
		<!--下一页-->
		<div class="fr toppage">
			总共找到<span style="color: red;">{{$all}}</span>个商品
			<span class="totalpage">{{Page::getSelfPage()}}/{{Page::getTotalPage()}}</span>
			<span class="page">
				<a class="" href="{{Page::getPre()}}"><i class="pre iconfont">&#xe619;</i></a>
				<a class="next" href="{{Page::getNext()}}">下一页<i class=" iconfont">&#xe616;</i></a>
			</span>
		</div>
		<div class="sort_type fl">
			<label for="" class="fl">排序方式：</label>
			<a href="#" style="background: #E60012;color: #FFFFFF;">默认</a>
			<a href="">销量</a>
			<a href="">新品</a>
			<a href="">价格<i class="iconfont">&#xe61d;</i></a>
			<a href="">折扣<i class="iconfont">&#xe61d;</i></a>
		</div>
		<!--价格区间-->
		<form action="" method="post">
				<input type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" name="price1" id="" placeholder="￥"/>
				<i class="fl">-</i>
				<input type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" name="price2" id="" placeholder="￥"/>
				<input type="submit" class="btn submit" value="确定"/>
				<input type="reset" class="btn" name="" id="" value="清空" />
			</div>
		</form>
	</div>
</div>

<!--商品展示区域-->
<div id="show">
	
	<ul class="show_list">
		{{foreach from="$goodsData" value="$v"}}
		<li>
			<div class="img">
				<a href="{{U('Show/index',array('gid'=>$v['gid']))}}">
					<img src="{{$v['listpic']}}" alt="" />
					<div {{if value="$v['mprice'] neq $v['sprice']"}} class="mark_small"{{else}}class="mark_small_else"{{endif}}>
						限时抢<strong>￥{{$v['sprice']}}</strong>
					</div>
				</a>
			</div>
			
			<div class="con">
				<p class="nptt">
					<a href="{{U('Show/index',array('gid'=>$v['gid']))}}" title="{{$v['gname']}}">{{$v['gname']}}</a>
				</p>
				<p class="price">
					<span class="price_now">
						￥<span>{{$v['sprice']}}</span>
					</span>
					<span class="price_old">
						￥{{$v['mprice']}}
					</span>
				</p>
			</div>
		</li>
		{{endforeach}}
	</ul>
	
	
</div>
{{if value="$page"}}
<div class="newPage">
	<ul class="d_pa clearfix fr">
		{{$page}}
    <span class="fl pageinfo">
    	<span> 共{{Page::getTotalPage()}}页，到第 <input id="jumpToPage" value="{{Page::getSelfPage()}}" class="ginput" type="text"> 页 </span>
    	<a href="{{U('List/index',array('cid'=>$cid,'page'=>2))}}" class="gbtn">确定</a> 
    </span>
    
  	</ul>
</div>
{{endif}}
	<!--载入底部公共模板-->
{{include file='VIEW_PATH/Common/footer.php'}}
</body>
</html>
















